package com.dongdong.api;


import com.dongdong.fallback.SellerFallBackFactory;
import com.dongdong.model.TbSeller;
import com.dongdong.utils.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


@FeignClient(value = "dongdong-seller-service",fallbackFactory = SellerFallBackFactory.class)
public interface SellerApi {

    @GetMapping("/seller/getSellerByName")
    public TbSeller getSellerByName(@RequestParam String username);

    @PostMapping("/seller/addSeller")
    public void addSeller(@RequestBody TbSeller seller);
}
